package com.async.designpatterns.structure.decorator;

public class ConcreteDecorator extends Decorator {

    public ConcreteDecorator(Component component) {
        super(component);
    }

    @Override
    public void action(String action){
        preAction();
        super.action(action);
        afterAction();
    }

    private void preAction(){
        System.out.println("准备操作：");
    }

    private void afterAction(){
        System.out.println("完成操作！");
    }

}
